<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>show2</title>
</head>
<body>

<div th:object="${user}">
    <div th:text="*{name}">唐僧</div>
    <div th:text="*{age}">500</div>
    <div th:text="${user.friend}">没有朋友</div>
</div>

</body>
</html>